import { getHomePage } from "../../services/index";

const app = getApp<IAppOption>();
export {};

Page({
  /**
   * 页面的初始数据
   */
  data: {},

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad() {
    // 回调用户信息
    app.userInfoReadyCallback = (result: any) => {
      this.setData({ userInfo: result });
      this.init();
    };
  },

  onShow() {
    this.init();
  },

  init() {
    getHomePage();
  },
});
